[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
TRIM(SEXP1,SEXP2) (STRING)
Function
Trim a specified character from both ends of a string.
Syntax
TRIM(str,ch)
str = Any string expression.
ch = A string (first chacater only) with the character to strip from
both ends of str.
Return Type & Value
STRING
Returns the trimmed str.
Remarks
A common need in programming is to strip leading and/or trailing spaces
(or other characters). This function will strip a specified character
from both ends of a string and return the trimmed string.
Examples
STRING s
LET s = " TEST "
PRINTLN TRIM(s," ") ' Will print "TEST"
PRINTLN TRIM(".....DA"+"TA.....",".") ' Will print "DATA"
PRINTLN TRIM(".....DA"+"TA....."," ") ' Will print ".....DATA....."
See Also:
LTRIM()
RTRIM()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson